package com.sxt.sys.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sxt.sys.domain.Hotel;
import com.sxt.sys.service.HotelService;
import com.sxt.sys.utils.DataGridView;
import com.sxt.sys.utils.ResultObj;
import com.sxt.sys.vo.HotelVo;

@RestController
@RequestMapping("hotel")
public class HotelController {
	
	@Autowired
	private HotelService hotelService;
	
	
		
	/*//加载客房查询
		@RequestMapping("loadAllHotel")
		public DataGridView loadAllHotel(HotelVo hotelVo) {
			return hotelService.queryAllHotel(hotelVo);
			}*/
		
	
		@RequestMapping("loadHotel")
		public  List<Hotel> loadHotel() {
			
			return hotelService.queryAllHotelForList();
		}
	
		/*//删除客房
		@RequestMapping("deleteHotel")
		public ResultObj deleteHotel(Integer id) {
			try {
				hotelService.deleteHotel(id);
				return new ResultObj(200, "删除成功");
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			return new ResultObj(-1, "删除失败");
		}*/
		
}
